﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormFieldList.aspx.cs" Inherits="CRM.Web.FormManage.FormFieldList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <uc:ucHead ID="ucHead1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
        <tr>
            <td class="left">
                <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
            </td>
            <td class="middle">
                <div class="pagetitle">
                    <div>
                        <asp:Label ID="lblTitle" runat="server">表单字段信息列表</asp:Label></div>
                </div>
            </td>
            <td class="right">
                <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
            </td>
        </tr>
    </table>
    <div id="divMain">
        <div style="width: 100%">
            <div class="listdiv">
                <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                    <tr>
                        <td class="title">
                            <div class="nowrap">
                                表单:</div>
                        </td>
                        <td class="content">
                            <asp:DropDownList ID="ddlFormID" runat="server" CssClass="ddl">
                            </asp:DropDownList>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                字段名称:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtFieldName" runat="server" CssClass="txt" 
                                TextMode="SingleLine"></asp:TextBox>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                字段描述:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtFieldDescription" runat="server" TextMode="SingleLine"></asp:TextBox>
                        </td>
                        <td class="title" style="width: auto;">
                            &nbsp;
                        </td>
                        <td class="content">
                            <div style="width: 100px;" class="nowrap">
                                <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                    OnClick="btnSearch_Click" /></div>
                        </td>
                    </tr>
                </table>
                <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                    OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting"
                    AllowPaging="True" AllowSorting="True" SortExpressionValue="SortNumber">
                    <Columns>
			            <asp:BoundField DataField="SortNumber" HeaderText="排序"  SortExpression="SortNumber" />
                        <asp:TemplateField HeaderText="字段编号" SortExpression="FormFieldID">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlModifyFormFieldID" runat="server" NavigateUrl='<%# Eval("FormFieldID", ModifyUrl) %>' Text='<%# Bind("FormFieldID") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="字段名称" SortExpression="FieldName">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlModifyFieldName" runat="server" NavigateUrl='<%# Eval("FormFieldID", ModifyUrl) %>' Text='<%# Bind("FieldName") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
			            <asp:BoundField DataField="FormID" HeaderText="表单编号"  SortExpression="FormID" Visible="false" />
			            <asp:BoundField DataField="FieldDescription" HeaderText="字段描述"  SortExpression="FieldDescription" />
			            <asp:BoundField DataField="CssClass" HeaderText="样式名称"  SortExpression="CssClass" />
			            <asp:BoundField DataField="ColSpan" HeaderText="跨列数"  SortExpression="ColSpan" />
			            <asp:BoundField DataField="Width" HeaderText="最小宽度"  SortExpression="Width" />
			            <asp:BoundField DataField="MaxLenght" HeaderText="最大字符长度"  SortExpression="MaxLenght" />
			            <asp:BoundField DataField="IsEnabled" HeaderText="是否起用"  SortExpression="IsEnabled" />
			            <asp:BoundField DataField="IsPostBack" HeaderText="是否回传"  SortExpression="IsPostBack" />
			            <asp:BoundField DataField="IsBlankRow" HeaderText="是否插入空白行（下拉列表）"  SortExpression="IsBlankRow" />
			            <asp:BoundField DataField="ExclusiveRow" HeaderText="是否独占行"  SortExpression="ExclusiveRow" />
			            <asp:BoundField DataField="Fromat" HeaderText="格式化"  SortExpression="Fromat" />
			            <asp:BoundField DataField="DefaultValue" HeaderText="默认值"  SortExpression="DefaultValue" />
			            <asp:BoundField DataField="RelationFields" HeaderText="关联字段名"  SortExpression="RelationFields" />
			            <asp:BoundField DataField="CommandText" HeaderText="按钮显示文字"  SortExpression="CommandText" />
			            <asp:BoundField DataField="DataSourceType" HeaderText="数据源类型"  SortExpression="DataSourceType" />
			            <asp:BoundField DataField="DataSourceInfo" HeaderText="数据源信息"  SortExpression="DataSourceInfo" />
			            <asp:BoundField DataField="FieldType" HeaderText="控件类型"  SortExpression="FieldType" />
			            <asp:BoundField DataField="CreateTime" HeaderText="创建时间"  SortExpression="CreateTime"  Visible="false" />
			            <asp:BoundField DataField="CreatePeople" HeaderText="创建人"  SortExpression="CreatePeople"  Visible="false" />
			            <asp:BoundField DataField="CreatePeopleId" HeaderText="创建人编号"  SortExpression="CreatePeopleId"  Visible="false" />
			            <asp:BoundField DataField="ModifyTime" HeaderText="修改时间"  SortExpression="ModifyTime"  Visible="false" />
			            <asp:BoundField DataField="ModifyPeople" HeaderText="修改人"  SortExpression="ModifyPeople"  Visible="false" />
			            <asp:BoundField DataField="ModifyPeopleId" HeaderText="修改人编号"  SortExpression="ModifyPeopleId"  Visible="false" />
			            <asp:BoundField DataField="Remark" HeaderText="备注"  SortExpression="Remark" Visible="false" />
                        <asp:TemplateField HeaderText="操作" ShowHeader="False">
                            <ItemTemplate>
                                <div style="white-space: nowrap;">
                                    <asp:HyperLink ID="hlModify" runat="server" NavigateUrl='<%# Eval("FormFieldID", ModifyUrl) %>'>详细</asp:HyperLink>
                                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False"
                                        OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="row" />
                    <AlternatingRowStyle CssClass="row2" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                </dp:WebGridView>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
